#pragma warning(disable:4704)
#include "mem.h"

/* Can not use size as parameter name ?*/
int memcmp(void far *buf1, void far *buf2, size_t _size)
{
	int result = 0;

	_asm push	ds
	_asm les	di, buf1
	_asm lds	si, buf2
	_asm mov	cx, _size
	_asm cld
	_asm rep	cmpsb
	_asm pop	ds
	_asm je	done
	_asm mov	result, -1
	_asm js	done
	_asm mov	result, 1
done:;
	return result;
}

